<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8">
		<title>注册</title>
		<link rel="stylesheet" type="text/css" href="../../../static/layui/css/layui.css" th:href="@{/layui/css/layui.css}"/>
		<link rel="stylesheet" type="text/css" href="../../../static/layui/css/login.css" th:href="@{/layui/css/login.css}"/>
		<!-- <script type="text/jscript" src="../../../static/lay/modules/jquery.js"></script> -->
	</head>
	<body>
		<div id="reg-btn" class="">
			<div class="reg-tap">
				<span>注册</span>
				<hr class="layui-bg-gray">
				<input id="msg" type="hidden" th:value="${session.msg}">
			</div>

			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">
					<form class="layui-form" action="" th:action="@{/User/reg}" method="post">
						<div class="layui-form-item">
							<div class="input-style" style="padding-top: 8px;">
								<i class="layui-icon">&#xe66f;</i>
								<input type="text" name="uid" required lay-verify="required" placeholder="请输入昵称" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="input-style" style="padding-top: 8px;">
								<i class="layui-icon">&#xe673;</i>
								<input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off"
								 class="layui-input">
							</div>
						</div>
						<!-- <div class="layui-form-item">
							<div class="input-style" style="padding-top: 10px;">
								<i class="layui-icon">&#xe673;</i>
								<input type="password" name="password" required lay-verify="required" placeholder="请确认密码" autocomplete="off"
								 class="layui-input">
							</div>
						</div> -->
						<div class="layui-form-item">
							<div class="input-style" style="padding-top: 8px;">
								<i class="layui-icon">&#xe618;</i>
								<input type="text" name="email" required lay-verify="required" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
							</div>
							<!-- <div class="layui-form-mid layui-word-aux">辅助文字</div> -->
						</div>
						<div class="layui-form-item">
							<div class="input-style2" style="padding-top: 8px;">
								<i class="layui-icon">&#xe609;</i>
								<input type="text" name="verification" required lay-verify="required" placeholder="请输入验证码" autocomplete="off"
								 class="layui-input">
							</div>
							<button id="getcode" type="button" class="layui-btn layui-btn-primary custom-btn3">获取验证码</button>
						</div>
						<button type="submit" class="layui-btn custom-btn">注册</button>
					</form>
					<div class="unregister" style="margin-top: -10px;">
						<a href="login.html" th:href="@{/User/login}">返回登录</a>
					</div>
				</div>
			</div>
		</div>
		<script  src="../../../static/layui/layui.js" th:src="@{/layui/layui.js}"></script>

		<script>
            layui.use(['element', 'layer'], function () {
                var element = layui.element;
                var $ = layui.$,
                    layer = layui.layer;
                if ($("#msg").val() != "") {
                    if ($("#msg").val() == "注册成功！") {
                        layer.msg($("#msg").val());
                        var index = parent.layer.getFrameIndex(window.name);
                        //再执行关闭
                        parent.layer.close(index);
                        //刷新页面
                        parent.location.reload()
                    } else {
                        layer.msg($("#msg").val());
                    }
                }
            });
		</script>
		<script src="../../../static/layui/lineEffects.js" th:src="@{/layui/lineEffects.js}"></script>

	</body>
</html>
